
use "${ddata}cleaned_data_wACSweight.dta", clear 


****************************************************************
*************** Table A2: Correlation with other variables *****

gen gss_norm_1 = qgn6_1==1|qgn6_1==2 	 if qgn6_1~=. & qgn6_1<5 
gen gss_norm_6 = 1-(qgn6_6==1|qgn6_6==2) if qgn6_6~=. & qgn6_6<5 

forvalues i=2(1)5 {

	gen gss_norm_`i' = qgn6_`i'==1|qgn6_`i'==2 if qgn6_`i'~=.&qgn6_`i'<5 

}

pwcorr gss_norm_* qs2_0 if control==1&sce_date~=202110   [aw=weight_ACS], sig


cap file close table
file open table using "${o}/corr_norms.tex", write replace
file write table "\begin{tabular}{l c} \toprule "_n
file write table " & \multicolumn{1}{c}{Mother should reject offer} \\"_n
file write table "  \hline " _n
pwcorr gss_norm_1 qs2_0 if control==1 & sce_date~=202110 [aw=weight_ACS], sig
local m1: di %6.2f el(r(C),2,1)
local m1a: di %6.3f el(r(sig),2,1)
if `m1a' < 0.1 local starf "*"
if `m1a' < 0.05 local starf "**"
if `m1a' < 0.01 local starf "***"	
file write table "Working mom can have warm relationship with child  & `m1'`starf'  \\"_n
pwcorr gss_norm_2 qs2_0 if control==1 & sce_date~=202110 [aw=weight_ACS], sig
local m1: di %6.2f el(r(C),2,1)
local m1a: di %6.3f el(r(sig),2,1)
if `m1a' < 0.1 local starf "*"
if `m1a' < 0.05 local starf "**"
if `m1a' < 0.01 local starf "***"	
file write table "Pre-schooler likely to suffer if mother works  & `m1'`starf'  \\"_n
pwcorr gss_norm_3 qs2_0 if control==1 & sce_date~=202110 [aw=weight_ACS], sig
local m1: di %6.2f el(r(C),2,1)
local m1a: di %6.3f el(r(sig),2,1)
if `m1a' < 0.1 local starf "*"
if `m1a' < 0.05 local starf "**"
if `m1a' < 0.01 local starf "***"	
file write table "Better if man is achiever  & `m1'`starf'  \\"_n
pwcorr gss_norm_4 qs2_0 if control==1 & sce_date~=202110 [aw=weight_ACS], sig
local m1: di %6.2f el(r(C),2,1)
local m1a: di %6.3f el(r(sig),2,1)
if `m1a' < 0.1 local starf "*"
if `m1a' < 0.05 local starf "**"
if `m1a' < 0.01 local starf "***"	
file write table "Wife should help husband's career  & `m1'`starf'  \\"_n
pwcorr gss_norm_5 qs2_0 if control==1 & sce_date~=202110 [aw=weight_ACS], sig
local m1: di %6.2f el(r(C),2,1)
local m1a: di %6.3f el(r(sig),2,1)
if `m1a' < 0.1 local starf "*"
if `m1a' < 0.05 local starf "**"
if `m1a' < 0.01 local starf "***"	
file write table "Women earning more will cause problems  & `m1'`starf'  \\"_n
file write table "\bottomrule "_n
file write table "\end{tabular}" _n
cap file close table

